package edu.iiitb.studentinfo.action;

import java.util.ArrayList;

import com.opensymphony.xwork2.ActionSupport;
import edu.iiitb.studentinfo.model.*;
import edu.iiitb.studentinfo.service.StudentSearchService;

public class StudentSearchAction extends ActionSupport {
	
	private static final long serialVersionUID = 8948610731771775347L;
	
	private String searchString;
	private ArrayList<Friend> students = new ArrayList<Friend>();
	
	public String execute() {
		StudentSearchService ss = new StudentSearchService();
		students = ss.getStudents(searchString);
		return "success";
	}
	
	public String getSearchString() {
		return searchString;
	}

	public void setSearchString(String searchString) {
		this.searchString = searchString;
	}

	public ArrayList<Friend> getStudents() {
		return students;
	}

	public void setStudents(ArrayList<Friend> students) {
		this.students = students;
	}

	
}
